Component({
  options: {
    addGlobalClass: true
  },
  properties: {
    checkboxs: Array
  },
  methods: {
    checkboxChange(e) {
      const { value } = e.detail
      const checkedboxs = this.data.checkboxs
        .filter(item => value.includes(item.value))
        .map(item => {
          return { value: item.value, name: item.name }
        })

      this.triggerEvent('onchange', checkedboxs)
    }
  }
})